﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using DTO;
using DAO;

namespace BUS
{
    public class TraCuuChuyenBay_BUS
    {
        public static BindingList<TraCuuChuyenBay_DTO> GetChuyenBayTheoTuyenBayList(string SanBayDi, string SanBayDen)
        {
            BindingList<TraCuuChuyenBay_DTO> list = new BindingList<TraCuuChuyenBay_DTO>();
            try
            {
                TraCuuChuyenBay_DAO DAO = new TraCuuChuyenBay_DAO();
                list = DAO.GetChuyenBayTheoTuyenBayList(SanBayDi, SanBayDen);
            }
            catch (System.Exception)
            { }
            return list;
        }

        public static BindingList<TraCuuChuyenBay_DTO> GetChuyenBayTheoNgayBayList(DateTime Tu, DateTime Den)
        {
            BindingList<TraCuuChuyenBay_DTO> list = new BindingList<TraCuuChuyenBay_DTO>();
            try
            {
                TraCuuChuyenBay_DAO DAO = new TraCuuChuyenBay_DAO();
                list = DAO.GetChuyenBayTheoNgayBayList(Tu, Den);
            }
            catch (System.Exception)
            { }
            return list;
        }

        public static BindingList<TraCuuChuyenBay_DTO> GetChuyenBayTheoSoGheTrongList(int Tu, int Den)
        {
            BindingList<TraCuuChuyenBay_DTO> list = new BindingList<TraCuuChuyenBay_DTO>();
            try
            {
                TraCuuChuyenBay_DAO DAO = new TraCuuChuyenBay_DAO();
                list = DAO.GetChuyenBayTheoSoGheTrongList(Tu, Den);
            }
            catch (System.Exception)
            { }
            return list;
        }
    }
}
